MySQL ERROR 1045 (28000): Access denied for user ‘my | 您所在的位置:网站首页 › 1405 access denied for user › MySQL ERROR 1045 (28000): Access denied for user ‘my |
MySQL ERROR 1045 (28000): Access denied for user ‘bill’@‘localhost’ (using password: YES) You probably have an anonymous user ''@'localhost' or ''@'127.0.0.1'. As per the manual: When multiple matches are possible, the server must determine which of them to use. It resolves this issue as follows: (…) When a client attempts to connect, the server looks through the rows [of table mysql.user] in sorted order.The server uses the first row that matches the client host name and user name.(…) The server uses sorting rules that order rows with the most-specific Host values first. Literal host names [such as ‘localhost’] and IP addresses are the most specific. Therefore such an anonymous user would “mask” any other user like '[any_username]'@'%' when connecting from localhost. 'bill'@'localhost' does match 'bill'@'%', but would match (e.g.) ''@'localhost' beforehands. The recommended solution is to drop this anonymous user (this is usually a good thing to do anyways). |
CopyRight 2018-2019 实验室设备网 版权所有 |